PlantSight Enterprise Help

Using Replacement Strings

When defining an advanced custom tag match, you can choose to replace existing tags with a custom value using a replacement string. These replacement strings can use a simple character for character replacement, or they can use groups to deconstruct and reformat a tag.

Simple Regex Replacement String

Given the following scenario in which...

Regular Expression value = -

Replacement String value = /

...the following acquired tags would be replaced with the matched digital twin tags as identified below:
Acquired Tag Matched Digital Twin Tag
U01-V0001 UO1/V0001
UO1-V0002 UO1/V0002

Regex Groups

Groups can be used to deconstruct an acquired tag name based on a known format and then reconstruct it into a new format. A common example of a Regex group is to convert a number into a telephone number format.

Given the following scenario in which...

Regular Expression value = ([0-9]{3})([0-9]{3})([0-9]{4})

Replacement String value = ($1)$2-$3

...the following acquired tags would be replaced with the matched digital twin tags as identified below:
Acquired Tag Matched Digital Twin Tag
0001112222 (000)111-2222
7778889999 (777)888-9999